using System;
using System.Collections.Generic;
using IBS.Model;
using IBS.Model.Base;
using System.Web.Security;

namespace IBS.ServiceContracts
{
    public interface IAuthorityService
    {
        void SubmitRegRequest(Request regRequest);
        void DeleteRegRequest(int requestId);
        Request GetRegRequestById(int id);
        IList<Request> GetRegRequests(Func<Request, bool> predicate = null, int? page = null);
        void AproveRegRequest(int requestId, string login);
        void RejectRegRequest(int requestId, string login);

        IList<CodeCard> GetMutchedCodeCards(int? page = null);
        IList<CodeCard> GetUnmatchedCodeCards(int? page = null);
        IList<CodeCard> GetCodeCards(Func<CodeCard, bool> predicate = null, int? page = null);
        int GetCurrentCodeCardNumber(string userName);
        bool TryCodeCard(string userName, string password);

        MembershipUser CreateUser(int clientId, CodeCard codeCard, string userName, string password, string email);
        MembershipUser CreateOperator(string userName, CodeCard codeCard, string password, string email);
        MembershipUser CreateAdmin(string userName, CodeCard codeCard, string password, string email);

        Client GetClientByUserName(string name);
        string GetClentUserName(Client client);
    }
}